package com.sdy.dcsb.biz.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sdy.dcsb.biz.mapper.EsbDataSourceMapper;
import com.sdy.dcsb.biz.model.EsbDataSource;
import com.sdy.dcsb.biz.service.EsbDataSourceService;
import com.sdy.mvc.service.impl.BaseServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Snaky
 * @date 2020/4/29
 */
@Slf4j
@Service
public class EsbDataSourceServiceImpl extends BaseServiceImpl<EsbDataSource> implements EsbDataSourceService {
    @Autowired
    private EsbDataSourceMapper mapper;

    /**
     * 查询已存在数据源分页信息
     *
     * @param page   分页信息
     * @param name   数据源名称
     * @param dbType 数据库类型 1 mysql，2 oracle, 3 sqlServer
     * @return 分页数据
     */
    @Override
    public IPage<EsbDataSource> getPageData(Page<?> page, String name, Integer dbType) {
        return mapper.getPageData(page,name,dbType);
    }
}
